<!-- Twitter data -->
    {% if site.data.authors and site.data.authors[page.author] %}
    {% assign author = site.data.authors.[page.author] %}
    {% elsif site.data.authors %}
    {% assign author = site.data.authors['default'] %}
    {% endif %}

<meta name="twitter:card" content="summary">

{% if author.twitter %}
<meta name="twitter:site" content="@{{ author.twitter}}">
{% endif %}

{% if page.title %}
<meta name="twitter:title" content="{{ page.title }}">
{% else %}
<meta name="twitter:title" content="{{ site.title }}">
{% endif %}

{% if page.url %}
{% capture page_url %}{{ page.url | replace:'/index.html','/' | absolute_url  }}{% endcapture %}
<meta name="twitter:url" content="{{ "" | absolute_url }}">
{% endif %}

<meta name="twitter:description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">

<meta name="twitter:image:src" content="{{cover | absolute_url  }}">
<!-- End: Twitter data -->